package com.slaffka.model;

import org.jboss.solder.core.Veto;

import javax.persistence.*;
import java.io.Serializable;

/**
 * Created with IntelliJ IDEA.
 * User: slaffka
 * Date: 02.12.12
 * Time: 16:12
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Veto
public class Role implements Serializable {

    private Long roleId;
    private RoleType roleType;

    public Role(){}

    public Role(RoleType roleType) {
        this();
        this.roleType = roleType;
    }

    @Id
    @Column(name = "role_id")
    @GeneratedValue(strategy = GenerationType.AUTO)
    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    @Column(name = "role_type")
    @Enumerated(EnumType.STRING)
    public RoleType getRoleType() {
        return roleType;
    }

    public void setRoleType(RoleType roleType) {
        this.roleType = roleType;
    }
}
